function toast(type, msg) {
    if (arguments.length < 2) {
      console.error('2 params to be need');
      return;
    }
    if (type != 'success' && type != 'error') {
      type = 'success'
    }
    var div = document.createElement('div');
    div.className = 'toast-box ' + type;
    div.innerHTML = msg
    div.style.cssText = "animation: mymove 2s forwards;-webkit-animation: mymove 2s forwards;-moz-animation: mymove 2s forwards;-ms-animation : mymove 2s forwards"
    document.body.appendChild(div);
    setTimeout(function () {
      document.body.removeChild(div);
    }, 3000)
  }
module.exports = toast;